import React, {Component} from 'react';
import './product.css'
import {Redirect, Route, Switch} from 'react-router-dom';
import ProductHome from "./productHome";
import Detail from "./detail";

//商品
class Product extends Component {

    render() {
        return (
            <Switch>
                {/*exact-路径完全匹配*/}
                <Route path='/admin/product' component={ProductHome} exact></Route>
                <Route path='/admin/product/detail' component={Detail}></Route>
                <Redirect to='/admin/product'/>
            </Switch>
        );
    }
}

export default Product;